package com.fjnu.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.fjnu.dao.IenclosureInsDao;
import com.fjnu.entities.EnclosureInstrument;
import com.fjnu.service.IEncInstrumentService;
@Service
@Transactional(propagation=Propagation.REQUIRED)
public class EncInstrumentService implements IEncInstrumentService {
	@Autowired
	private IenclosureInsDao enclosureInsDao;
	@Override
	public void addEncInstrument(EnclosureInstrument enclosureInstrument) {
		enclosureInsDao.addEncInstrument(enclosureInstrument);
	}

	@Override
	public void delEncInstrument(int id) {
		enclosureInsDao.delEncInstrument(id);

	}

	@Override
	public List<EnclosureInstrument> findManyEncInstrument(String condition, int pageSize, int pageIndex) {
		return enclosureInsDao.findManyEncInstrument(condition, pageSize, pageIndex);
	}

	@Override
	public EnclosureInstrument findUniqueEncInstrument(int id) {
		return enclosureInsDao.findUniqueEncInstrument(id);
	}

	@Override
	public void updateEncInstrument(EnclosureInstrument enclosureInstrument) {
		enclosureInsDao.updateEncInstrument(enclosureInstrument);
	}

	@Override
	public void delManyEncIns(List listId) {
		enclosureInsDao.delManyEncIns(listId);
	}

	@Override
	public List<EnclosureInstrument> findByMainId(int mainID) {
		return enclosureInsDao.findByMainId(mainID);
	}

}
